<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <style>
    .loading {
      width: 100vw;
      height: 100vh;

    }

    .loadingCart {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }
  </style>
  <script>
    const shallowObj = (obj) => {
      if (!obj || typeof obj !== "object") return
      const newObj = Array.isArray(obj) ? [] : {}
      for (let key in obj) {
        if (obj.hasOwnProperty(key)) {
          newObj[key] = obj[key]
        }
      }
      return newObj
    }
    console.log(shallowObj([3, 2, 34, 234, 3]))
    console.log(typeof []);
  </script>
</body>

</html>